package com.kyrioscraft.cloud.upmsserver.util;

import com.kyrioscraft.cloud.common.util.RequestHolder;
import com.kyrioscraft.cloud.upmsserver.entity.SysUser;

public class UpmsRequestHolder extends RequestHolder {
    private static final ThreadLocal<SysUser> userHolder = new ThreadLocal<SysUser>();

    public static void add(SysUser sysUser) {
        userHolder.set(sysUser);
    }
    public static SysUser getCurrentUser() {
        return userHolder.get();
    }

    public static void removeAll() {
        userHolder.remove();
        remove();
    }
}
